import request from "utils/request";

export function createBill({
  billCategoryId,
  remark,
  money,
  satisfactionLevel,
  dealTime,
}) {
  return request({
    url: "/bill/create",
    method: "post",
    data: {
      billCategoryId,
      remark,
      money,
      satisfactionLevel,
      dealTime,
    },
  });
}

/* 账本 */
export function listBook(params) {
  return request({
    url: "/accountBook/list",
    method: "get",
    params
  });
}

export function createBook({
  name,
  sceneId,
  initIs,
  shareIs,
  remark,
}) {
  return request({
    url: "/accountBook/create",
    method: "post",
    data: {
      name,
      sceneId,
      initIs,
      shareIs,
      remark,
    },
  });
}

// 获取场景列表
export function getSceneList(params) {
  return request({
    url: "/accountBook/getSceneList",
    method: "get",
    params
  });
}

/* 分类 */
// 获取类别列表
export function listCategory({ accountBookId }) {
  return request({
    url: "/billCategory/list",
    method: "get",
    params: {
      accountBookId,
    },
  });
}
